package persistence.xstream;

import persistence.CorruptDataException;
import persistence.Definitions;
import persistence.PersistenceController;
import persistence.PersistenceControllerTest;
import persistence.SingleSessionPersistence;
import persistence.xstream.XStreamPersistenceController;

/**
 * @author idan
 */
public class XStreamPersistenceControllerTest extends PersistenceControllerTest
{
	private static final String PATH = Definitions.makePath(Definitions.DATA_DIRECTORY,
		XStreamPersistenceControllerTest.class) ;
	private static final String DUMMIES_URI = XStreamPersistenceControllerTest.PATH + "dummies.xml" ;

	/**
	 * @see persistence.PersistenceControllerTest#getNewPersistence(boolean)
	 */
	@Override
	protected PersistenceController getNewPersistence(final boolean load) throws CorruptDataException
	{
		SingleSessionPersistence persistence = new XStreamPersistenceController(
			XStreamPersistenceControllerTest.DUMMIES_URI, load) ;
		return persistence ;
	}

}
